﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace MetroManagement
{
    /// <summary>
    /// 站点控制器
    /// </summary>
    [RemoteService]
    [Area("metroManagement")]
    [Route("api/metroManagement/stations")]
    public class StationController : AbpController, IStationAppService
    {
        private readonly IStationAppService _stationAppService;

        public StationController(
            IStationAppService stationAppService)
        {
            _stationAppService = stationAppService;
        }

        // 列表
        [HttpGet]
        [Route("list")]
        public Task<ResultResponse<IList<UniteStationDto>>> ListAsync(int? lineId = null, string name = null)
        {
            return _stationAppService.ListAsync(lineId, name);
        }
    }
}